#include "database/database.h"
#include "files/file_manager.h"
#include "scanner/scanner.h"
#include "settings/command_line.h"
#include "settings/settings.h"

int main(int argc, const char* argv[])
{
	Tvimeg::FileManager::Create();
	Tvimeg::FileManager::GetInstance().Initialise();

	Tvimeg::CommandLine::Create();
	Tvimeg::CommandLine::GetInstance().Initialise(argc, argv);

	Tvimeg::Settings::Create();
	Tvimeg::Settings::GetInstance().Initialise();

	Tvimeg::Database::Create();
	Tvimeg::Database::GetInstance().Initialise();

	Tvimeg::Scanner scanner;
	scanner.ScanAll();

	Tvimeg::Database::Destroy();
	Tvimeg::Settings::Destroy();
	Tvimeg::CommandLine::Destroy();
	Tvimeg::FileManager::Destroy();

	return 1;
}
